@extends('back.index')
@section('title','作者信息修改-后台管理系统')
@section('mian')
    @if(count($errors))
        <script>
            alert('{!! $errors->first('qq'),$errors->first('tel'),$errors->first('email'),$errors->first('newaddress'),$errors->first('pwd'),$errors->first('icon')!!}')
        </script>
    @endif
    <div style="font-size:14px;padding:20px;" class="modal-content">
        <h2 class="sub-header power_mian">修改作者信息</h2>
        <div class="container ">
            <div class="row">
                <div class="col-md-8">
                    <form class="form-horizontal" action="" method="post" enctype="multipart/form-data">
                        <div class="form-group">
                            <label for="inputPassword3" class="col-sm-2 control-label">作者笔名</label>
                            <div class="col-sm-10">
                                <input type="text" name="nickname" class="form-control" id="inputPassword3" placeholder="作者笔名" value="{{$user->nickname}}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputPassword3" class="col-sm-2 control-label">QQ</label>
                            <div class="col-sm-10">
                                <input type="text" name="qq" class="form-control" id="inputPassword3" placeholder="QQ" value="{{$user->qq}}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputPassword3" class="col-sm-2 control-label">邮箱</label>
                            <div class="col-sm-10">
                                <input type="email" name="email" class="form-control" id="inputPassword3" placeholder="邮箱" value="{{$user->email}}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputPassword3" class="col-sm-2 control-label">手机号码</label>
                            <div class="col-sm-10">
                                <input type="text" name="tel" class="form-control" id="inputPassword3" placeholder="手机号码" value="{{$user->tel}}">
                            </div>
                            {{csrf_field()}}
                        </div>
                        <div class="form-group">
                            <label for="inputPassword3" class="col-sm-2 control-label">性别</label>
                            <div class="col-sm-10">
                                <div class="sex">
                                    <label>男:<input type="radio" name="sex" value="1" id="inputPassword3" <?=$user->sex==1?'checked':'' ?> ></label>&nbsp;&nbsp;
                                    <label>女:<input type="radio" name="sex" value="2" id="inputPassword3" <?=$user->sex==2?'checked':'' ?> ></label>&nbsp;&nbsp;
                                    <label>保密:<input type="radio" name="sex" value="3" id="inputPassword3" <?=$user->sex==3?'checked':'' ?> ></label>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputPassword3" class="col-sm-2 control-label">详细地址</label>
                            <div class="col-sm-10">
                                <input type="text" name="newaddress" class="form-control" id="inputPassword3" placeholder="详细地址" value="{{$user->newaddress}}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputPassword3" class="col-sm-2 control-label">修改头像</label>
                            <div class="col-sm-10">
                                <input type="file" name="icon" class="btn btn-default" >
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <input type="submit" class="btn btn-default" value="修改">
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

@endsection